#ifndef POSTPONEDIALOG_H
#define POSTPONEDIALOG_H

#include "ui_postponedialog.h"

namespace Ui {
    class PostponeDialog;
}

class PostponeDialog : public QDialog
{
    Q_OBJECT

public:
    explicit PostponeDialog( QWidget * parent = 0, Qt::WindowFlags f = 0 );
    ~PostponeDialog();

signals:
    void stopSound();
    void postpone(uint secs);
    void clearHistory(const int index);

public slots:
    void setDialogMsg(const QString& msg);
    inline void setAutoclose(const int secs = 30) {_autoclose = secs; }
    void runAutoclose();
    void disablePostpone(const bool disable);
    void setReminderIndex(const int index = 0);
protected:
    void closeEvent(QCloseEvent *event);

private slots:
    void postpone();
    void autoclose();
    void stopeAutoclose(const int value);

private: 
    Ui::PostponeDialog *ui;
    QTimer* timer;
    int _autoclose;
    int _reminder_index;
};

#endif // POSTPONEDIALOG_H
